package com.lin.collector.util;

import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;


/**
 * @author 九分石人
 */
public class InputMDC implements EnvironmentAware {

    private static Environment environment;

    @Override
    public void setEnvironment(Environment environment) {
        InputMDC.environment = environment;
    }


    public static void put() {
        MDC.put("hostname", "127.0.0.1:8080");
        MDC.put("ip", "127.0.0.1");
        MDC.put("applicationName", "collector");
    }


}
